home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
library
/
reqtlsdv.lha
/
ReqTools
/
Glue
/
SAS-C
/
LibSource.lha
/
src
/
autoopen.c
next >
Wrap
C/C++ Source or Header
|
1994-03-24
|
751b
|
40 lines
#include <proto/exec.h>
#include <utility/tagitem.h>
#include <proto/reqtools.h>
#include <libraries/reqtools.h>
#include "sc:source/constructor.h"
void __regargs __autoopenfail (char *);
static void *libbase;
struct ReqToolsBase *ReqToolsBase;
extern long __oslibversion;
CBMLIB_CONSTRUCTOR(openreqtools)
{
long old_os_lib = __oslibversion;
__oslibversion = REQTOOLSVERSION;
ReqToolsBase = libbase = (void *) OpenLibrary (REQTOOLSNAME, __oslibversion);
if (!ReqToolsBase)
{
__autoopenfail (REQTOOLSNAME);
__oslibversion = old_os_lib;
return 1;
}
__oslibversion = old_os_lib;
return 0;
}
CBMLIB_DESTRUCTOR(closereqtools)
{
if (libbase) {
CloseLibrary ((struct Library *) libbase);
libbase = ReqToolsBase = NULL;
}
}